export default {
  data() {
    return {
      tableHeight: 400
    }
  },
  created() {},
  mounted() {
    // 固定表头，根据屏幕大小计算表格高度
    this.$nextTick(() => {
      let that = this
      let top = this.$refs.table.$el.offsetTop
      let paginationHeight = this.$refs.hasOwnProperty('pagination')
        ? this.$refs.pagination.$el.offsetHeight
        : 0
      this.tableHeight = window.innerHeight - top - paginationHeight - 66
      window.onresize = function() {
        that.tableHeight = window.innerHeight - top - paginationHeight - 66
      }
    })
  },
  methods: {}
}
